import 'package:exampel_localization/blocs/bloc_provider.dart';
import 'package:exampel_localization/common/interface/user_provider.dart';
import 'package:flutter/material.dart';
import 'package:rxdart/rxdart.dart';

class ApplicationBloc implements BlocBase {

  BehaviorSubject<UserProvider> _userEvent = BehaviorSubject<UserProvider>();
  Sink<UserProvider> get _userEventSink => _userEvent.sink;
  Stream<UserProvider> get _userEventStream => _userEvent.stream;

  final bool forceLogin = true;

  UserProvider? _user;


  @override
  void dispose() {
    // TODO: implement dispose

    _userEvent.close();
  }

  @override
  Future? getData({required String labelId, required int page}) {
    // TODO: implement getData
    return null;
  }

  @override
  Future? onLoadMore({required String labelId}) {
    // TODO: implement onLoadMore
    return null;
  }

  @override
  Future? onRefresh({required String labelId}) {
    // TODO: implement onRefresh
    return null;
  }

  void sendUserEvent(UserProvider user) {
    _user = user;
    _userEventSink.add(user);
  }

}
